﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HomeworkOpp
{
    class GsmCall
    {
        private DateTime date;
        private DateTime time;
        private int numbersDialed;
        private long callDuration;

        public GsmCall(DateTime Date, DateTime Time, int NumbersDialed, long CallDuration)
        {
            this.date = Date;
            this.time = Time;
            this.numbersDialed = NumbersDialed;
            this.callDuration = CallDuration;
        }

        public DateTime Date
        {
            get { return this.date; }
        }
        public DateTime Time
        {
            get {return this.time ;}
        }
        public int NumbersDialed
        {
                get {return this.numbersDialed ;}
                set {
                    if (value<0)
                    {
                        throw new ArgumentException("numbersdialed must be positive");
                    }
            this.numbersDialed=value;}
        }
        public long CallDuration
        {
            get {return this.callDuration;}
            set{if (value<=0)
	            {
		            throw new ArgumentException("callDuration must be positive");
	            }
                this.callDuration=value;}
        }
    }
}

